//
//  UserTableViewCell.m
//  afn
//
//  Created by mac on 2018/5/9.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "UserTableViewCell.h"

@implementation UserTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)creatView{
    UILabel *label=[UILabel new];
    [self addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.centerY.mas_equalTo(0);
    }];
    label.text=@"头像";
    label.font=[UIFont systemFontOfSize:14];
    label.textColor=ColorWithRGB(49, 49, 49);
    
    
    UIImageView *jianTouimage=[UIImageView new];
    [self addSubview:jianTouimage];
    [jianTouimage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-10);
        make.centerY.mas_equalTo(0);
        make.width.mas_equalTo(9);
        make.height.mas_equalTo(18/4*3);
    }];
    jianTouimage.image=[UIImage imageNamed:@"arrow_right_black"];
    
    UIImageView *imageView=[UIImageView new];
    [self addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(jianTouimage.mas_left).mas_equalTo(-10);
        make.centerY.mas_equalTo(0);
        make.width.height.mas_equalTo(60);
    }];
    imageView.layer.cornerRadius=30;
    imageView.layer.masksToBounds=YES;
    NSString *url=_useerModel.image_path;
    [imageView sd_setImageWithURL:[NSURL URLWithString:url]];
    imageView.backgroundColor=_backgroundColor;
    
    
    UIView *xianView=[UIView new];
    [self addSubview:xianView];
    [xianView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.right.mas_equalTo(-10);
        make.bottom.mas_equalTo(0);
        make.height.mas_equalTo(1);
    }];
    xianView.backgroundColor=_LightGrey;
}

-(void)creatView2{
    UILabel *label=[UILabel new];
    [self addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.centerY.mas_equalTo(0);
    }];
    label.text=@"昵称";
    label.font=[UIFont systemFontOfSize:14];
    label.textColor=ColorWithRGB(49, 49, 49);
    
    
    UIImageView *jianTouimage=[UIImageView new];
    [self addSubview:jianTouimage];
    [jianTouimage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-10);
        make.centerY.mas_equalTo(0);
        make.width.mas_equalTo(9);
        make.height.mas_equalTo(18/4*3);
    }];
    jianTouimage.image=[UIImage imageNamed:@"arrow_right_black"];
    
    UILabel *nameLabel=[UILabel new];
    [self addSubview:nameLabel];
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(jianTouimage.mas_left).mas_equalTo(-10);
        make.centerY.mas_equalTo(0);
    }];
    nameLabel.font=[UIFont systemFontOfSize:14];
    nameLabel.text=@"18183128005";
    nameLabel.textColor=ColorWithRGB(149, 149, 149);
    
    
    UIView *xianView=[UIView new];
    [self addSubview:xianView];
    [xianView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.right.mas_equalTo(-10);
        make.bottom.mas_equalTo(0);
        make.height.mas_equalTo(1);
    }];
    xianView.backgroundColor=_LightGrey;
}

-(void)creatView3{
    UILabel *label=[UILabel new];
    [self addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.centerY.mas_equalTo(0);
    }];
    label.text=@"我的手机号";
    label.font=[UIFont systemFontOfSize:14];
    label.textColor=ColorWithRGB(49, 49, 49);
    
    
    UIImageView *jianTouimage=[UIImageView new];
    [self addSubview:jianTouimage];
    [jianTouimage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-10);
        make.centerY.mas_equalTo(0);
        make.width.mas_equalTo(9);
        make.height.mas_equalTo(18/4*3);
    }];
    jianTouimage.image=[UIImage imageNamed:@"arrow_right_black"];
    
    UILabel *nameLabel=[UILabel new];
    [self addSubview:nameLabel];
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(jianTouimage.mas_left).mas_equalTo(-10);
        make.centerY.mas_equalTo(0);
    }];
    nameLabel.font=[UIFont systemFontOfSize:14];
    nameLabel.text=@"18183128005";
    nameLabel.textColor=ColorWithRGB(149, 149, 149);
    
}
@end
